import type { PaginationParams, CommonStatus, AuditStatus } from './common'

// 客户信息
export interface Customer {
  id: number
  name: string
  shortName?: string
  industry?: string
  source?: string
  level: number
  tags?: string
  address?: string
  website?: string
  remark?: string
  belongUid: number
  createTime: string
  updateTime: string
}

// 客户联系人
export interface CustomerContact {
  id: number
  customerId: number
  name: string
  mobile?: string
  email?: string
  position?: string
  isDefault: number
  birthday?: string
  remark?: string
  createTime: string
  updateTime: string
}

// 合同信息
export interface Contract {
  id: number
  title: string
  code: string
  customerId: number
  typeId: number
  amount: number
  signDate: string
  startDate: string
  endDate: string
  status: AuditStatus
  createTime: string
  updateTime: string
}

// 财务-报销
export interface Expense {
  id: number
  title: string
  amount: number
  categoryId: number
  expenseDate: string
  remark?: string
  fileIds?: string
  status: AuditStatus
  createTime: string
  updateTime: string
}

// 财务-开票
export interface Invoice {
  id: number
  title: string
  amount: number
  taxRate: number
  invoiceType: number
  customerId: number
  status: AuditStatus
  createTime: string
  updateTime: string
}

// OA-日程安排
export interface Plan {
  id: number
  title: string
  content?: string
  type: number
  startTime: string
  endTime: string
  remindType?: number
  remindTime?: string
  createTime: string
  updateTime: string
}

// OA-工作记录
export interface Schedule {
  id: number
  title: string
  content?: string
  laborType: number
  laborTime: number
  startTime: string
  endTime: string
  customerId?: number
  createTime: string
  updateTime: string
}

// OA-工作汇报
export interface WorkReport {
  id: number
  title: string
  types: number
  works: string
  startDate: string
  endDate: string
  toUids: string
  sendTime?: string
  createTime: string
  updateTime: string
}

// 查询参数类型
export interface CustomerListParams extends PaginationParams {
  industry?: string
  source?: string
  level?: number
  belongUid?: number
}

export interface ContractListParams extends PaginationParams {
  customerId?: number
  typeId?: number
  status?: AuditStatus
  startDate?: string
  endDate?: string
}

export interface ExpenseListParams extends PaginationParams {
  categoryId?: number
  status?: AuditStatus
  startDate?: string
  endDate?: string
}

export interface PlanListParams extends PaginationParams {
  type?: number
  startDate?: string
  endDate?: string
}
